//定义常量
const Token = "token"
const RefreshToken = "refreshToken"

//获取Token
export function getToken() {
    return localStorage.getItem(Token) 
}
//获取RefreshToekn
export function getRefreshToekn() {
    return localStorage.getItem(RefreshToken)

}
//保存Token和RefreshToken
export function setToken(token, refreshtoken) {
    localStorage.setItem(Token, token);
    localStorage.setItem(RefreshToken, refreshtoken);

}

//删除Token和RefreshToken
export function clearToken() {
    localStorage.removeItem(Token);
    localStorage.removeItem(RefreshToken);

}

//判断是否为登录状态
export function isLogin(){
    let token=getToken()
    if(token){
      return true
    }else{
      return false
    }
  }